package com.yj.springbootdynamic.service;

import com.yj.springbootdynamic.config.DataSourceSwitch;
import com.yj.springbootdynamic.entity.Info;
import com.yj.springbootdynamic.mapper.InfoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InfoService {

    @Autowired
    InfoMapper infoMapper;

    @DataSourceSwitch(value = "master",clear = false)
    public List<Info> findAll(){
        return infoMapper.findAll();
    }


}
